package com.bgIntlgn.client.entity.jishubu;

import java.util.Date;

import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

@Table(name = "element_subversions", constrain = "")
public class ElementSubversion implements Bean {

	/**
	 * 零件的UID(elementUid)
	 */
	@Field(name = "uid", type = "char(80)", constrain = "primary key")
	private String uid;

	/**
	 * 参考零件的elementId
	 */
	@Field(name = "element_id", type = "int8", constrain = " not null references elements(id) on update cascade ")
	private Long elementId;

	/**
	 * 规格， 应客户要求加的。
	 */
	@Field(name = "spec", type = "varchar(200)", constrain = "not null")
	private String spec;

	/**
	 * 表示当前版本的状态： 草稿(false)， 正式版(true)。 注意： 现在没有生产版本了， 生产版，
	 * 现在需要放到具体的引用环境下，产品或者组建， 才有意义。
	 */
	@Field(name = "valid", type = "boolean", constrain = "not null default false")
	private boolean valid;

	/**
	 * 创建人
	 */
	@Field(name = "creator_id", type = "int8", constrain = "not null references employees(id)  on update cascade ")
	private Long creatorId;

	/**
	 * 创建时间
	 */
	@Field(name = "create_time", type = "timestamp", constrain = "")
	private Date createTime;

	/**
	 * 材质ID
	 * 
	 */
	@Field(name = "material_id", type = "int8", constrain = "not null references materials(id) on update cascade ")
	private Long materialId;

	/**
	 * 实现方式， 是否为外购， 或者其他。。。列， 自产<BR>
	 * 只是默认值。
	 */
	@Field(name = "impl_method", type = "int8", constrain = "not null references dictionarys(id) on update cascade ")
	private Long implementMethod;

	public String getSpec() {
		return this.spec;
	}

	public void setSpec(String spec) {
		this.spec = spec;
	}

	public Long getElementId() {
		return this.elementId;
	}

	public void setElementId(Long elementId) {
		this.elementId = elementId;
	}

	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid.trim();
	}

	public boolean isValid() {
		return this.valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

	public Long getCreatorId() {
		return this.creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Long getMaterialId() {
		return this.materialId;
	}

	public void setMaterialId(Long materialId) {
		this.materialId = materialId;
	}

	public Long getImplementMethod() {
		return this.implementMethod;
	}

	public void setImplementMethod(Long implementMethod) {
		this.implementMethod = implementMethod;
	}

}
